package org.example.blogserver.service;

import org.example.blogserver.entity.SysUser;
import org.example.blogserver.vo.Result;
import org.example.blogserver.vo.UserVo;
import org.example.blogserver.vo.params.PasswordParam;

public interface SysUserService {
    Result insertUser(SysUser user);

    // 修改密码
    Result updatePassword(String token, PasswordParam passwordParam);

    Result getUserInfoByAccount(String account);

    UserVo getUserVoByAccount(String account);

    Result getUserInfo(String account, String password);


    // 获取用户列表
    Result getUserList();


    // 删除用户
    Result deleteUser(String token,String account);

    // 根据账号修改昵称
    Result updateNicknameByAccount(String account, String newNickname);

    // 根据账号修改头像
    Result updateAvatarByAccount(String account, byte[] newAvatar);

    UserVo convertToUserVo(SysUser sysUser);
}
